
public class RPG {
    public static void showBlood(SwordsMan swordsMan) {
        System.out.printf("%s HP %d%n",
                swordsMan.getName(), swordsMan.getBlood());
    }

    public static void showBlood(Magician magician) {
        System.out.printf("%s HP %d%n",
                magician.getName(), magician.getBlood());
    }

    public static void main(String[] args) {
        SwordsMan swordsMan = new SwordsMan();
        swordsMan.setName("Mike");
        swordsMan.setLevel(1);
        swordsMan.setBlood(200);
        System.out.printf("SwordMan：(%s, %d, %d)%n", swordsMan.getName(),
                swordsMan.getLevel(), swordsMan.getBlood());

        Magician magician = new Magician();
        magician.setName("Susan");
        magician.setLevel(1);
        magician.setBlood(100);
        System.out.printf("Magician：(%s, %d, %d)%n", magician.getName(),
                magician.getLevel(), magician.getBlood());
        
        showBlood(swordsMan);
        showBlood(magician);
    }
}
